package com.lzd.framework.springsecurity.security;

import java.util.Collection;
import java.util.Collections;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Oauth2User extends User {
	/**
	 * 用户ID
	 */
	@Setter
	@Getter
	private Long userId;

	public Oauth2User(Long userId,  String username, String password, 
			Collection<? extends GrantedAuthority> authorities) {
		super(username, password, true, true, true, true, authorities);
		this.userId = userId;
	}
}